package com.hello.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 设备状态记录对象 device_status_log
 * 
 * @author hello
 * @date 2025-09-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DeviceStatusLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 日志ID */
    private Long logId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;

    /** 原状态 */
    @Excel(name = "原状态")
    private String oldStatus;

    /** 新状态 */
    @Excel(name = "新状态")
    private String newStatus;

    /** 信号强度 */
    @Excel(name = "信号强度")
    private Long signalStrength;

    /** CPU使用率(%) */
    @Excel(name = "CPU使用率(%)")
    private BigDecimal cpuUsage;

    /** 内存使用率(%) */
    @Excel(name = "内存使用率(%)")
    private BigDecimal memoryUsage;

    /** 设备温度(°C) */
    @Excel(name = "设备温度(°C)")
    private BigDecimal temperature;

    /** 错误信息 */
    @Excel(name = "错误信息")
    private String errorMsg;

    /** 状态变更原因 */
    @Excel(name = "状态变更原因")
    private String changeReason;

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date recordTime;

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setOldStatus(String oldStatus) 
    {
        this.oldStatus = oldStatus;
    }

    public String getOldStatus() 
    {
        return oldStatus;
    }
    public void setNewStatus(String newStatus) 
    {
        this.newStatus = newStatus;
    }

    public String getNewStatus() 
    {
        return newStatus;
    }
    public void setSignalStrength(Long signalStrength) 
    {
        this.signalStrength = signalStrength;
    }

    public Long getSignalStrength() 
    {
        return signalStrength;
    }
    public void setCpuUsage(BigDecimal cpuUsage) 
    {
        this.cpuUsage = cpuUsage;
    }

    public BigDecimal getCpuUsage() 
    {
        return cpuUsage;
    }
    public void setMemoryUsage(BigDecimal memoryUsage) 
    {
        this.memoryUsage = memoryUsage;
    }

    public BigDecimal getMemoryUsage() 
    {
        return memoryUsage;
    }
    public void setTemperature(BigDecimal temperature) 
    {
        this.temperature = temperature;
    }

    public BigDecimal getTemperature() 
    {
        return temperature;
    }
    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }
    public void setChangeReason(String changeReason) 
    {
        this.changeReason = changeReason;
    }

    public String getChangeReason() 
    {
        return changeReason;
    }
    public void setRecordTime(Date recordTime) 
    {
        this.recordTime = recordTime;
    }

    public Date getRecordTime() 
    {
        return recordTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("deviceId", getDeviceId())
            .append("oldStatus", getOldStatus())
            .append("newStatus", getNewStatus())
            .append("signalStrength", getSignalStrength())
            .append("cpuUsage", getCpuUsage())
            .append("memoryUsage", getMemoryUsage())
            .append("temperature", getTemperature())
            .append("errorMsg", getErrorMsg())
            .append("changeReason", getChangeReason())
            .append("recordTime", getRecordTime())
            .toString();
    }
}
